package stud.aistar.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import stud.aistar.entity.Image;
import stud.aistar.mapper.ImageMapper;
import stud.aistar.service.IImagesService;

import java.util.List;

/**
 * @version 1.0
 * @Auther: git:jybdd - liming
 * @Description - 本类用于: 图像service实现类
 * @Date: 2019/9/28 19:29
 */
@Service
@Transactional
class ImagesServiceImpl implements IImagesService {

    @Autowired
    private ImageMapper mapper;

    /**
     * 查看身份证图片
     * @param id
     * @return
     */
    @Override
    public List<Image> findByUserId(Integer id) {
        List<Image> image = mapper.findByUserId(id);
        return image;
    }

    /**
     * 插入身份证图片
     */
    @Override
    public void save(Image image) {
        mapper.save(image);
    }
}
